﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Prj1011m.aspx.cs" Inherits="Updms.Prj.Prj1011m" ValidateRequest="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>▒ UPDMS [Prj1011m] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
	<tr>
		<td id="top_area" colspan="2">
			<!-- Top 시작 -->
			<ucTop:Top id="Top" runat="server"></ucTop:Top>
			<!-- Top 끝 -->
		</td>
	</tr>
	<tr>
		<td id="menu_area">
			<!-- 메뉴 시작 -->
			<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
			<!-- 메뉴 끝 -->
		</td>
		<td id="contents_area">
			<!-- 제목 시작 -->
			<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Prj1011m" runat="server"></ucTabTitle:TabTitle>
			<!-- 제목 끝 -->
			<!-- AJAX 시작 -->
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
			<Triggers>
				<asp:PostBackTrigger ControlID="ibtn_excel"/>
				<asp:PostBackTrigger ControlID="ibtn_save"/>
			</Triggers>
			<ContentTemplate>
			<!-- 버튼 시작 -->
			<div class="button_area">
				<asp:linkbutton id="ibtn_excel" Text="엑셀" runat="server" CssClass="ibtn ibtn_excel" OnClick="ibtn_excel_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_favorite" Text="즐겨찾기" runat="server" CssClass="ibtn ibtn_favorite"></asp:linkbutton>
				<asp:linkbutton id="ibtn_upload" Text="업로드" runat="server" CssClass="ibtn ibtn_upload" OnClientClick="goPrjUploadPage();return false;"></asp:linkbutton>
				<asp:linkbutton id="ibtn_delete" Text="삭제" runat="server" CssClass="ibtn ibtn_delete" OnClientClick="return chkDelete()" OnClick="ibtn_delete_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_save" Text="저장" runat="server" CssClass="ibtn ibtn_save" OnClientClick="return chkSave()" OnClick="ibtn_save_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_search" Text="검색" runat="server" CssClass="ibtn ibtn_search" OnClick="ibtn_search_Click"></asp:linkbutton>
			</div>
			<!-- 버튼 끝 -->
			<!-- 검색 시작 -->
			<table class="table_search">
				<tr>
					<td class="lbl"><asp:Literal id="ltr_search_prj_id" Text="프로젝트" runat="server" /></td>
					<td class="ctl" colspan="3"><asp:dropdownlist id="ddl_search_prj_id" runat="server" CssClass="ddl" Width="99.8%" OnSelectedIndexChanged="ddl_search_prj_id_SelectedIndexChanged" AutoPostBack="True"></asp:dropdownlist></td>
					<td class="lbl" width="11%"><asp:Literal id="ltr_search_work_tp" Text="업무" runat="server" /></td>
					<td class="ctl" width="22%"><asp:dropdownlist id="ddl_search_work_tp" runat="server" CssClass="ddl"></asp:dropdownlist></td>
				</tr>
				<tr>
					<td class="lbl" width="11%"><asp:Literal id="ltr_search_div" Text="구분" runat="server" /></td>
					<td class="ctl" width="22%"><img src="../Common/Images/application_form.png" align="absmiddle" alt="multi_check" class="hand" onclick="showHiddenDiv('div_search_div', event);" /></td>
					<td class="lbl" width="11%"><asp:Literal id="ltr_search_title" Text="제목" runat="server" /></td>
					<td class="ctl" width="22%"><asp:textbox id="txt_search_title" runat="server" Width="98%" CssClass="ib_b"></asp:textbox></td>
					<td class="lbl" width="11%"><asp:Literal id="ltr_search_status" Text="상태" runat="server" /></td>
					<td class="ctl" width="22%"><img src="../Common/Images/application_form.png" align="absmiddle" alt="multi_check" class="hand" onclick="showHiddenDiv('div_search_status', event);" /></td>
				</tr>
			</table>
			<!-- 검색 끝 -->
			<!-- 페이지모드 전환버튼 시작 -->
			<div class="page_mode_area">
				<span id="btn_chg_mode" onclick="return chgMode()" runat="server"></span>
				<span id="btn_init_mode" title="초기화" class="sbtn sbtn_init" onclick="return initDetail()"></span>
			</div>
			<!-- 페이지모드 전환버튼 끝 -->
			<!-- 디테일 시작 -->
			<table class="table_detail">
				<tr>
					<td class="lbl" width="10%"><asp:Literal id="ltr_reg_dt" Text="등록일" runat="server" /></td>
					<td class="ctl" width="20%"><asp:textbox id="txt_reg_dt" runat="server" CssClass="ib_b_dt req"></asp:textbox>&nbsp;<img src="../Common/Images/calendar.png" id="ci_reg_dt" class="ci_calendar" runat="server"></td>
					<td class="lbl" width="10%"><asp:Literal id="ltr_work_tp" Text="업무" runat="server" /></td>
					<td class="ctl" width="20%"><asp:dropdownlist id="ddl_work_tp" runat="server" CssClass="ddl"></asp:dropdownlist></td>
					<td class="lbl" width="10%"><asp:Literal id="ltr_pgm_nm" Text="프로그램" runat="server" /></td>
					<td class="ctl" width="30%"><asp:textbox id="txt_pgm_nm" runat="server" Width="98%" CssClass="ib_b req" EnableViewState="False"></asp:textbox></td>
				</tr>
				<tr>
					<td class="lbl"><asp:Literal id="ltr_div" Text="구분" runat="server" /></td>
					<td class="ctl"><asp:dropdownlist id="ddl_div" runat="server" CssClass="ddl"></asp:dropdownlist></td>
					<td class="lbl"><asp:Literal id="ltr_title" Text="제목" runat="server" /></td>
					<td class="ctl" colspan="3"><asp:textbox id="txt_title" runat="server" Width="99.2%" CssClass="ib_b req" EnableViewState="False"></asp:textbox></td>
				</tr>
				<tr>
					<td class="ctl" colspan="6" style="padding:1px">
						<table class="default">
							<tr>
								<td class="lbl_c" width="50%"><asp:Literal id="ltr_contents" Text="내용" runat="server" /></td>
								<td class="lbl_c" width="50%"><asp:Literal id="ltr_handle_contents" Text="처리내용" runat="server" /></td>
							</tr>
							<tr>
								<td class="ctl" style="padding:1px"><asp:textbox id="txt_contents" runat="server" Width="98.3%" CssClass="tb_scroll req" Rows="8" TextMode="MultiLine" EnableViewState="False"></asp:textbox></td>
								<td class="ctl" style="padding:1px"><asp:textbox id="txt_handle_contents" runat="server" Width="98.3%" CssClass="tb_scroll" Rows="8" TextMode="MultiLine" EnableViewState="False"></asp:textbox></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td class="lbl"><asp:Literal id="ltr_concern_person" Text="관련자" runat="server" /></td>
					<td class="ctl"><asp:textbox id="txt_concern_person" runat="server" Width="97.6%" CssClass="ib_b" EnableViewState="False"></asp:textbox></td>
					<td class="lbl"><asp:Literal id="ltr_handle_time" Text="예상소요시간" runat="server" /></td>
					<td class="ctl"><asp:textbox id="txt_handle_time" runat="server" Width="97.6%" CssClass="ib_b" EnableViewState="False"></asp:textbox></td>
					<td class="lbl" rowspan="4"><asp:Literal id="ltr_file_list" Text="첨부파일" runat="server" /></td>
					<td class="ctl" rowspan="4" style="padding:2px;" valign="top">
						<asp:GridView ID="gv_file_list" CssClass="table_file_list" GridLines="None" runat="server" AutoGenerateColumns="False" DataKeyNames="File_Nm,File_Size,File_Ext,File_Dir,File_W_Size,File_H_Size">
							<Columns>
								<asp:BoundField DataField="No" HeaderText="번호" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="10%" Height="22" />
								</asp:BoundField>
								<asp:BoundField DataField="Download_Link" HeaderText="파일명" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="80%" />
								</asp:BoundField>
								<asp:TemplateField HeaderText="삭제">
									<ItemTemplate>
										<asp:CheckBox ID="cb_select" runat="server" />
									</ItemTemplate>
									<ItemStyle Width="10%" HorizontalAlign="Center" />
								</asp:TemplateField>
							</Columns>
						</asp:GridView>
					</td>
				</tr>
				<tr>
					<td class="lbl"><asp:Literal id="ltr_receive_dt" Text="접수일자" runat="server" /></td>
					<td class="ctl"><asp:textbox id="txt_receive_dt" runat="server" CssClass="ib_b_dt req"></asp:textbox>&nbsp;<img src="../Common/Images/calendar.png" id="ci_receive_dt" class="ci_calendar" runat="server"></td>
					<td class="lbl"><a href="javascript:void(0);" onclick="setCompleteDt()"><u><asp:Literal id="ltr_complete_dt" Text="완료예정일" runat="server" /></u></a></td>
					<td class="ctl"><asp:textbox id="txt_complete_dt" runat="server" CssClass="ib_b_dt" EnableViewState="False"></asp:textbox>&nbsp;<img src="../Common/Images/calendar.png" id="ci_complete_dt" class="ci_calendar" runat="server"></td>
				</tr>
				<tr>
					<td class="lbl"><a href="javascript:void(0);" onclick="setRealCompleteDt()"><u><asp:Literal id="ltr_real_complete_dt" Text="완료일" runat="server" /></u></a></td>
					<td class="ctl"><asp:textbox id="txt_real_complete_dt" runat="server" CssClass="ib_b_dt" EnableViewState="False"></asp:textbox>&nbsp;<img src="../Common/Images/calendar.png" id="ci_real_complete_dt" class="ci_calendar" runat="server"></td>
					<td class="lbl"><asp:Literal id="ltr_status" Text="상태" runat="server" /></td>
					<td class="ctl"><asp:dropdownlist id="ddl_status" runat="server" CssClass="ddl"></asp:dropdownlist></td>
				</tr>
				<tr>
					<td class="lbl" Height="40"><asp:Literal id="ltr_remark" Text="비고" runat="server" /></td>
					<td class="ctl" colspan="3"><asp:textbox id="txt_remark" runat="server" Width="98.1%" CssClass="tb_scroll" Rows="3" Height="32" TextMode="MultiLine" EnableViewState="False"></asp:textbox></td>
				</tr>
			</table>
			<!-- 디테일1 끝 -->
			<!-- 리스트셋 시작 -->
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td>
						<!-- 검색어 시작 -->
						<div class="div_left">Keyword : <asp:label id="lbl_search_keyword" runat="server"></asp:label></div>
						<div class="div_right"><asp:checkbox id="cb_list_all" runat="server" AutoPostBack="True" OnCheckedChanged="cb_list_all_CheckedChanged" ToolTip="Show All"></asp:checkbox></div>
						<!-- 검색어 끝 -->
					</td>
				</tr>
				<tr>
					<td>
						<!-- 리스트 시작 -->
						<asp:GridView ID="GridView1" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand"  DataKeyNames="Seq,Prj_Id,Work_Tp,Div,Title,Contents,Handle_Contents,Concern_Person,Handle_Time,Receive_Dt,Status,Remark">
							<Columns>
								<asp:TemplateField HeaderText="&lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;checkBoxCheck('GridView1');&quot;&gt;S&lt;/a&gt;">
									<ItemTemplate>
										<input id="cb_check" class="cb" type="checkbox" onclick="reverseRow('GridView1', 0);" runat="server" />
									</ItemTemplate>
									<ItemStyle HorizontalAlign="Center" Width="2%" />
								</asp:TemplateField>
								<asp:BoundField HeaderText="번호" >
									<ItemStyle HorizontalAlign="Center" Width="4%" />
								</asp:BoundField>
								<asp:BoundField DataField="Seq" HeaderText="Seq(X)" Visible="False" />
								<asp:BoundField DataField="Prj_Id" HeaderText="Prj_Id(X)" Visible="False" />
								<asp:BoundField DataField="Reg_Dt" HeaderText="등록일" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="7%" />
								</asp:BoundField>
								<asp:BoundField DataField="Work_Tp" HeaderText="Work_Tp(X)" Visible="False" />								
								<asp:BoundField DataField="Work_Tp_Nm" HeaderText="업무" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="6%" />
								</asp:BoundField>
								<asp:BoundField DataField="Pgm_Nm" HeaderText="프로그램" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="12%" />
								</asp:BoundField>
								<asp:BoundField DataField="Div" HeaderText="Div(X)" Visible="False" />
								<asp:BoundField DataField="Div_Nm" HeaderText="구분" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="7%" />
								</asp:BoundField>
								<asp:TemplateField HeaderText="제목">
									<ItemTemplate>
										<asp:LinkButton ID="lbtn_rc" runat="server" Text='<%# Bind("Title_Reduce") %>'></asp:LinkButton>
									</ItemTemplate>
									<HeaderStyle CssClass="lbtn_rc balloon" />
									<ItemStyle HorizontalAlign="Left" Width="40%" />
								</asp:TemplateField>
								<asp:BoundField DataField="Title" HeaderText="Title(X)" Visible="False" />
								<asp:BoundField DataField="Contents" HeaderText="Contents(X)" Visible="False" />
								<asp:BoundField DataField="Handle_Contents" HeaderText="Handle_Contents(X)" Visible="False" />
								<asp:BoundField DataField="Concern_Person" HeaderText="Concern_Person(X)" Visible="False" />
								<asp:BoundField DataField="Handle_Time" HeaderText="Handle_Time(X)" Visible="False" />
								<asp:BoundField DataField="Receive_Dt" HeaderText="접수일자(X)" Visible="False" />								
								<asp:BoundField DataField="Complete_Dt" HeaderText="완료예정일" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="7%" />
								</asp:BoundField>
								<asp:BoundField DataField="Real_Complete_Dt" HeaderText="완료일" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="7%" />
								</asp:BoundField>
								<asp:BoundField DataField="Status" HeaderText="Status(X)" Visible="False" />
								<asp:BoundField DataField="Status_Nm" HeaderText="상태" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="4%" />
								</asp:BoundField>
								<asp:BoundField DataField="Remark" HeaderText="Remark(X)" Visible="False" />
								<asp:BoundField DataField="Attach_File_Info" HeaderText="파일" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="4%" />
								</asp:BoundField>
							</Columns>
							<EmptyDataTemplate>
								<div id="no_data"></div>
							</EmptyDataTemplate>
						</asp:GridView>
						<!-- 리스트 끝 -->
					</td>
				</tr>
				<tr>
					<td>
						<!-- 페이징 시작 -->
						<div class="div_left">Result : <asp:label id="lbl_result_count" runat="server"></asp:label></div>
						<div class="div_right"><asp:label id="lbl_page" runat="server"></asp:label></div>
						<!-- 페이징 끝 -->
					</td>
				</tr>
			</table>
			<!-- 리스트셋 끝 -->
			<!-- 다중검색 시작 -->
			<div id="div_search_div" class="div_scroll div_multi_box" style="display:none;height:140px;width:120px;position:absolute;overflow-y:auto;">
				<asp:CheckBoxList id="cbl_search_div" runat="server" RepeatDirection="Vertical" CssClass="cbl_vertical"></asp:CheckBoxList>
			</div>
			<div id="div_search_status" class="div_scroll div_multi_box" style="display:none;height:120px;width:100px;position:absolute;overflow-y:auto;">
				<asp:CheckBoxList id="cbl_search_status" runat="server" RepeatDirection="Vertical" CssClass="cbl_vertical"></asp:CheckBoxList>
			</div>
			<!-- 다중검색 끝 -->
			<!-- 카피라이트 시작 -->
			<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
			<!-- 카피라이트 끝 -->
			<!-- 히든값 시작 -->
			<div id="hdn_data">
				<asp:label id="lbl_pk" runat="server"></asp:label>
				<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
				<asp:Label id="lbl_prj_id" runat="server"></asp:Label>
				<asp:linkbutton id="lbtn_init_detail" runat="server" OnClick="lbtn_init_detail_Click" />
				<asp:linkbutton id="lbtn_chg_mode" runat="server" OnClick="lbtn_chg_mode_Click" />
				<asp:Label id="lbl_attach_file_info" runat="server" EnableViewState="true"></asp:Label>
				<input id="h_no" type="hidden" name="h_no" runat="server" />
			</div>
			<act:CalendarExtender ID="ce_reg_dt"
				runat="server"
				TargetControlID="txt_reg_dt"
				Format="yyyy-MM-dd"
				PopupButtonID="ci_reg_dt"
				EnableViewState="False"
				BehaviorID="bi_reg_dt"
				CssClass="calendar">
			</act:CalendarExtender>
			<act:CalendarExtender ID="ce_receive_dt"
				runat="server"
				TargetControlID="txt_receive_dt"
				Format="yyyy-MM-dd"
				PopupButtonID="ci_receive_dt"
				EnableViewState="False"
				BehaviorID="bi_receive_dt"
				CssClass="calendar">
			</act:CalendarExtender>
			<act:CalendarExtender ID="ce_complete_dt"
				runat="server"
				TargetControlID="txt_complete_dt"
				Format="yyyy-MM-dd"
				PopupButtonID="ci_complete_dt"
				EnableViewState="False"
				BehaviorID="bi_complete_dt"
				CssClass="calendar">
			</act:CalendarExtender>
			<act:CalendarExtender ID="ce_real_complete_dt"
				runat="server"
				TargetControlID="txt_real_complete_dt"
				Format="yyyy-MM-dd"
				PopupButtonID="ci_real_complete_dt"
				EnableViewState="False"
				BehaviorID="bi_real_complete_dt"
				CssClass="calendar">
			</act:CalendarExtender>
			<act:AutoCompleteExtender ID="ace_title"
				runat="server"
				TargetControlID="txt_title"
				ServiceMethod="GetSearchData"
				ServicePath="../Common/Inc/AutoCompleteWebService.asmx"
				MinimumPrefixLength="1"
				CompletionSetCount="20"
				CompletionInterval="800"
				EnableCaching="true"
				UseContextKey="true"
				ContextKey="Prj1011m"
				CompletionListCssClass="ace_List"
				CompletionListItemCssClass="ace_ListItem"
				CompletionListHighlightedItemCssClass="ace_HighlightedItem" >
			</act:AutoCompleteExtender>
			</ContentTemplate>
			</asp:UpdatePanel>
			<!-- AJAX 끝 -->
		</td>
	</tr>
</table>



</form>
<script type="text/javascript" language="javascript" defer="defer">
	//저장
	function chkSave() {
		if ($F("txt_reg_dt").blank()) {
			msgBox.alert(getMsg(MSG_ERR_063), setFocus, "txt_reg_dt"); //등록일을 입력해 주세요
			return false;
		}
		if ($F("txt_pgm_nm").blank()) {
			msgBox.alert(getMsg(MSG_ERR_007), setFocus, "txt_pgm_nm"); //프로그램명을 입력해 주세요
			return false;
		}
		if ($F("txt_title").blank()) {
			msgBox.alert(getMsg(MSG_ERR_016), setFocus, "txt_title"); //제목을 입력해 주세요
			return false;
		}
		if ($F("txt_contents").blank()) {
			msgBox.alert(getMsg(MSG_ERR_018), setFocus, "txt_contents"); //내용을 입력해 주세요
			return false;
		}

		var pk = $get("lbl_pk").innerHTML;
		var MSG_ID = (pk == "") ? MSG_CFM_000 : MSG_CFM_028; //저장/수정
		msgBox.confirm(getMsg(MSG_ID), doSave); //저장하시겠습니까?

		return false;
	}

	//삭제
	function chkDelete() {
		if(!isCheckedOnGridView("GridView1", 0)) {
			msgBox.alert(getMsg(MSG_ERR_053));	//삭제할 항목을 선택하세요
			return false;
		}
		msgBox.confirm(getMsg(MSG_CFM_001), doDelete);	//삭제하시겠습니까?
		return false;
	}

	//완료예정일
	function setCompleteDt() {
		$("txt_complete_dt").value = $("txt_receive_dt").value;
	}

	//완료일자
	function setRealCompleteDt() {
		$("txt_real_complete_dt").value = $("txt_complete_dt").value;
	}

	//디테일 초기화
	function initDetail() {
		__doPostBack('lbtn_init_detail', '');
	}

	//페이지모드 변경
	function chgMode() {
		__doPostBack('lbtn_chg_mode', '');
	}

</script>
</body>
</html>